/* Copyright 2011 Elektrobit Wireless Communications Oy (EB)


  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2 as 
  published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


 *All rights reserved 
 *Version:Elektrobit_Qt_1.0.0_20110305 */


#include "imagedata.h"
#include <appcommon.h>

void imageDatasPropClear(QDeclarativeListProperty<ImageData>* prop)
{
     static_cast<QList<ImageData*>*>(prop->data)->clear();
    return;
}

void imageDatasPropAppend(QDeclarativeListProperty<ImageData>* prop, ImageData* value)
{
     static_cast<QList<ImageData*>*>(prop->data)->append(value);
    return;
}

int imageDatasPropCount(QDeclarativeListProperty<ImageData>* prop)
{
    return static_cast<QList<ImageData*>*>(prop->data)->count();
}

ImageData* imageDatasPropAt(QDeclarativeListProperty<ImageData>* prop, int index)
{
    return static_cast<QList<ImageData*>*>(prop->data)->at(index);
}


ImageData::ImageData(QObject *parent) :
    QObject(parent)
{

}

ImageData::ImageData( QString &name,  QString &indexImage, QObject *parent )
  : QObject(parent), m_name(name), m_indexImage(indexImage) {

}


QString ImageData::name() const {
    return this->m_name;
}
void ImageData::setName(const QString &name) {
    this->m_name = name;
}

QString ImageData::indexImage() const {
    return this->m_indexImage;
}
void ImageData::setIndexImage(const QString &indexImage) {
    this->m_indexImage = indexImage;
}

void ImageData::click(QString name) {
    APPINFO << name;
}


QString ImageData::id() const {
    return this->m_id;
}

void ImageData::setId(const QString & id) {
    this->m_id = id;
}

QString ImageData::selectImage() const {
    return this->m_selectImage;
}

void ImageData::setSelectImage(const QString &selectImage) {
    this->m_selectImage = selectImage;
}




